home *** CD-ROM | disk | FTP | other *** search
- /*
- ### draw a rectangular box ###
- */
-
- #include <suntool/sunview.h>
- box(pw,x,y,w,h,color,p_type)
- Pixwin *pw;
- int x,y,w,h,color,p_type;
- {
- if(p_type==0) {
- pw_vector(pw, x, y, x + w, y, PIX_SRC | PIX_COLOR(color), 1);
- pw_vector(pw, x + w, y, x + w, y - h, PIX_SRC | PIX_COLOR(color), 1);
- pw_vector(pw, x + w, y - h, x, y - h, PIX_SRC | PIX_COLOR(color), 1);
- pw_vector(pw, x, y - h, x, y, PIX_SRC | PIX_COLOR(color), 1);
- }
- else {
- pw_vector(pw, x, y, x + w, y, PIX_SRC ^ PIX_DST | PIX_COLOR(color), 1);
- pw_vector(pw, x + w, y, x + w, y - h, PIX_SRC ^ PIX_DST | PIX_COLOR(color), 1);
- pw_vector(pw, x + w, y - h, x, y - h, PIX_SRC ^ PIX_DST | PIX_COLOR(color), 1);
- pw_vector(pw, x, y - h, x, y, PIX_SRC ^ PIX_DST | PIX_COLOR(color), 1);
- }
- }
-